package actions;

import gui.Frame;

import java.awt.event.ActionEvent;

import javax.swing.AbstractAction;

/**
 * An action for a staff member to view all of the blackballed volunteers in the system. 
 * @author Natalie
 *
 */
@SuppressWarnings("serial")
public class ViewBlackballedVolunteersAction extends AbstractAction {

	private final Frame myFrame;
	
	public ViewBlackballedVolunteersAction(final Frame theFrame) {
		super("View Blackballed Volunteers");
		myFrame = theFrame;
	}
	
	/**
	 * Sets the previous action that the user took and displays the list of 
	 * all of the blackballed volunteers in the system. 
	 */
	@Override
	public void actionPerformed(final ActionEvent theEvent) {
		myFrame.setPreviousAction(new HomeAction(myFrame));
		myFrame.displayBlackballedVolunteers();
	}


}
